package com.tsd.system.service;

import com.tsd.core.vo.HttpResult;
import com.tsd.core.vo.PageBean;
import com.tsd.job.entity.SysTaskJobExt;
import com.tsd.system.entity.SysAccountSet;
import com.tsd.system.entity.SysAccountSetExt;
import com.tsd.system.entity.SysUser;

import java.util.List;
import java.util.Map;

/**
 * 描述：SysAccountSet服务实现层接口
 *
 * @author huawei
 * @date 2021/09/02 21:46:17
 */
public interface SysAccountSetService {

    /**
     * 描述：根据id获取SysAccountSet
     *
     * @param id
     */
    SysAccountSet getSysAccountSetById(Long id) throws Exception;

    /**
     * 描述：根据sid获取SysAccountSet
     *
     * @param sid
     */
    SysAccountSetExt queryBySid(String sid);

    /**
     * 描述：根据sid列表删除SysAccountSet
     *
     * @param list
     */
    void deleteSysAccountSets(List<String> list, SysUser opUser) throws Exception;

    /**
     * 描述：保存或更新SysAccountSet
     *
     * @param record
     * @param opUser
     */
    void saveSysAccountSet(SysAccountSetExt record, SysUser opUser) throws Exception;

    /**
     * 描述：根据params分页查询SysAccountSet
     *
     * @param params
     * @param page
     */
    List<SysAccountSetExt> findSysAccountSets(Map<String, Object> params, PageBean page) throws Exception;

    /**
     * 描述：根据params分页查询SysAccountSet
     *
     * @param params
     */
    List<SysAccountSetExt> findSysAccountSets(Map<String, Object> params) throws Exception;

    /**
     * 根据客户信息创建账套
     * @param client
     * @param opUser
     * @throws Exception
     */
//    void createSysAccountSet4Client(SysClientExt client, SysUser opUser) throws Exception;

    /**
     * 根据账套信息创建数据库
     *
     * @param t
     * @param reset 是否重置
     * @throws Exception
     */
    void createDataBase(SysAccountSetExt t, boolean reset) throws Exception;

    List<SysTaskJobExt> getTaskJobList();

    void executeUpdateSchema(List<String> sidList, SysUser opUser) throws Exception;

    void saveSysAccountSetAttribute(SysAccountSetExt t, SysUser opUser) throws Exception;

    HttpResult<SysAccountSetExt> checkSysAccountSetValid(String sid);
}
